from gluon.contrib.populate import populate
if not db(db.auth_user).count():
    db.auth_user.insert(
            username='admin',
            first_name='Admin',
            last_name='Admin',
            password='8d9ceac8c2b376a3aadaa4a90b33d11cf7f59ecc9e31fa4726e00c5f7aebf3f0351dd11aeb2dcc6eb5132a1b70dcca03feab66699c074e80bb302fb2504990f4')
if not db(db.cron).count():
    db.cron.insert(start = 0)
if not db(db.users).count():
    db.users.insert(uid = '0', fname='0', country='0', token='0')
if not db(db.settings).count():
    db.settings.insert(
            fb_permissions = PERMISSIONS,
            fb_app_id      = APP_ID,
            fb_app_secret  = APP_SECRET,
            fb_canvas_page = APP_CANVAS,
            fb_canvas_url = APP_URL,
            landing_content = LAN_CONTENT,
            first_step = FIRST_STEP,
            app_content = APP_CONTENT,
            invite_title = INVITE_TITLE,
            invite_message = INVITE_MESSAGE,
            force_title = FORCE_HEADER,
            force_message = FORCE_MESSAGE,
            force_count_title = FORCE_COUNT_HEADER,
            force_message_before = FORCE_MESSAGE_BEFORE,
            force_message_after = FORCE_MESSAGE_AFTER,
            )
